<template>
    <div>
        <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
            <span id="my_logo"><a href="">One_Blog</a></span>
            <el-menu-item index="3">分类</el-menu-item>
            <el-menu-item index="2"><router-link to="/2">归档</router-link></el-menu-item>
            <el-menu-item index="1"><router-link to="/">首页</router-link></el-menu-item>
        </el-menu>
    </div>
</template>

<script>
    export default {
        name: "Header",
        data() {
            return {
                activeIndex: '1',
                activeIndex2: '1'
            };
        },
        methods: {
            handleSelect(key, keyPath) {
                console.log(key, keyPath);
            }
        }
    }
</script>

<style scoped>
    .el-menu-item {
        float: right;
    }

    #my_logo {
        float: left;
        font-size: 45px;
        line-height: 60px;
        margin-left: 90px;
        font-family: "STHupo","Microsoft YaHei","黑体","宋体",sans-serif;
    }
    .el-menu-item a{
        display: block;
        height: 58px;
        width: 50px;
    }
</style>